package com.emip.bean;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;


@Entity
@Table(name = "T_PLAN")
public class PlanBean {

	@Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE,generator="S_PLAN_ID_GENE")
    @SequenceGenerator(name="S_PLAN_ID_GENE",sequenceName="S_PLAN_ID", allocationSize = 1)
	private int id;
	@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
    @JoinColumn(name = "siteID")
	private SiteBean site;
	@Column(name="type")
	private String type;
	@Column(name="desc")
	private String desc;
	@Column(name="createTime")
	private Date createTime;
	@Column(name="specificTime")
	private Date specificTime;
	@Column(name="period")
	private int period;
	@Column(name="times")
	private int times;
	@Column(name="flag")
	private String flag;
	@Column(name="lastTime")
	private Date lastTime;
	@Column(name="nextTime")
	private Date nextTime;
	
	public PlanBean() {}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public SiteBean getSite() {
		return site;
	}

	public void setSite(SiteBean site) {
		this.site = site;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getSpecificTime() {
		return specificTime;
	}

	public void setSpecificTime(Date specificTime) {
		this.specificTime = specificTime;
	}

	public int getPeriod() {
		return period;
	}

	public void setPeriod(int period) {
		this.period = period;
	}

	public int getTimes() {
		return times;
	}

	public void setTimes(int times) {
		this.times = times;
	}

	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public Date getLastTime() {
		return lastTime;
	}

	public void setLastTime(Date lastTime) {
		this.lastTime = lastTime;
	}

	public Date getNextTime() {
		return nextTime;
	}

	public void setNextTime(Date nextTime) {
		this.nextTime = nextTime;
	}
	
}
